package cn.wolfcode.luowowo.repository;

import cn.wolfcode.luowowo.domain.Destination;
import cn.wolfcode.luowowo.domain.Region;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DestinationRepository extends MongoRepository<Destination,String> {
    /**
     * 通过id的集合查询目的地的集合
     * @param refIds
     * @return
     */
    List<Destination> findByIdIn(List<String> refIds);

    List<Destination> findByParentName(String parentName);

    List<Destination> findByParentId(String id, PageRequest of);

    Destination findByName(String keyword);
}
